<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<?php echo $cabecalho; ?>
<?php echo $menu_esq; ?>
<script type="text/javascript" src="<?php echo url::base();?>media/js/form"></script>
<div id="mainContent">
<h1>Lista de Modulos</h1>
<div>
<?php echo html::anchor("module/criar", "Criar Novo"); ?>
</div>
<p>
<?php echo form::open('', array('method'=>'post', 'name'=>'form1'))?>
<?php echo $pagination;?>
<table width="100%" border="1">
      <tr>
      	<td>&nbsp;</td>
        <td>name</td>
        <td>description</td>
      </tr>
<?php 
	foreach($modules as $module){
		echo "
		<tr>
			<td>".form::checkbox('module_id[]', $module->id)."</td>
			<td>$module->name &nbsp;</td>
			<td>$module->description &nbsp;</td>
		</tr>";
	}
?>
      <tr>
        <td>&nbsp;</td>
        <td colspan="2">
        	<a href="#" onClick="submeter('<?php echo url::base()?>module/ver');">Ver</a>&nbsp;
        	<a href="#" onClick="submeter('<?php echo url::base()?>module/editar');">Editar</a>&nbsp;
        	<a href="#" onClick="submeter('<?php echo url::base()?>module/deletar');">Deletar</a>&nbsp;
        </td>
      </tr>
    </table>
<?php echo form::hidden('pg_num', $pg_num)?>
<?php echo form::close();?>
</p>
<!-- end #mainContent --></div>
<?php echo $rodape; ?>